-- GENERATED SPELL FOR [Ymirjar Witch Doctor] --


function spell0_26691(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(49084,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26691', 2000, 1)
end

function spell1_26691(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(59246,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26691', 2000, 1)
end

function spell2_26691(pUnit, Event) --@Shrink,n/a--
pUnit:FullCastSpellOnTarget(49089,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26691', 3000, 1)
end

function spell3_26691(pUnit, Event) --@Shrink,n/a--
pUnit:FullCastSpellOnTarget(59247,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26691', 3000, 1)
end

function Sorts_26691(pUnit, Event)
local choix_sorts_26691 = math.random(0, 3)
if choix_sorts_26691 == 0 then
pUnit:RegisterEvent('spell0_26691', 1, 1)
end
if choix_sorts_26691 == 1 then
pUnit:RegisterEvent('spell1_26691', 1, 1)
end
if choix_sorts_26691 == 2 then
pUnit:RegisterEvent('spell2_26691', 1, 1)
end
if choix_sorts_26691 == 3 then
pUnit:RegisterEvent('spell3_26691', 1, 1)
end
end

function mob26691_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26691', math.random(1500, 3000), 1)
end

function mob26691_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26691_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26691_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26691, 1, 'mob26691_Action')
RegisterUnitEvent(26691, 2, 'mob26691_Leave')
RegisterUnitEvent(26691, 3, 'mob26691_Kill')
RegisterUnitEvent(26691, 4, 'mob26691_Die')
